Fix bug #6671 with recentering and other scrolling problems.
authorEli Zaretskii <eliz@gnu.org>
Thu, 31 Mar 2011 19:12:30 +0000 (21:12 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 31 Mar 2011 19:12:30 +0000 (21:12 +0200)
commitf1f82fb7f58252a1195453b76d829e17ab18122b
tree9faac183bde184b50ae0d9ab15ebac6588c37d85
parent958e6bc142b9003dcb8caf98df39b1b282417643
parent04fedec08b6db3a7dfe7d570d27ed090a1e666b2
Fix bug #6671 with recentering and other scrolling problems.

 src/xdisp.c (SCROLL_LIMIT): New macro.
 (try_scrolling): Use it when setting scroll_limit.  Limit
 scrolling to 100 screen lines.
 (redisplay_window): Even when falling back on "recentering",
 position point in the window according to scroll-conservatively,
 scroll-margin, and scroll-*-aggressively variables.
 (try_scrolling): When point is above the window, allow searching
 as far as scroll_max, or one screenful, to compute vertical
 distance from PT to the scroll margin position.  This prevents
 try_scrolling from unnecessarily failing when
 scroll-conservatively is set to a value slightly larger than the
 window height.  Clean up the case of PT below the margin at bottom
 of window: scroll_max can no longer be INT_MAX.  When aggressive
 scrolling is in use, don't let point enter the opposite scroll
 margin as result of the scroll.
 (syms_of_xdisp) <scroll-conservatively>: Document the
 threshold of 100 lines for never-recentering scrolling.

 doc/emacs/display.texi (Auto Scrolling): Document the limit of 100 lines
 for never-recentering scrolling with `scroll-conservatively'.
src/ChangeLog
src/xdisp.c